export default {
	state: {
		tabberList: [], // 默认底部导航栏
		tabberIndex: 0 // 默认选中图标
	},
	mutations: {
		// 给Tabber默认选中赋值
		changeTabberIndex(state, index) {
			console.log(index)
			state.tabberIndex = index;
		},
		// 给底部导航栏赋值
		changeTabberList(state, data) {
			state.tabberList = data;
		}
	},
	actions: {
		// 维保机构端/单位端-----负责人
		tabberMaintenance(ctx) {
			let menuList = [{
					iconPath: 'home',
					selectedIconPath: 'home-fill',
					text: '首页11',
					customIcon: false, // 如果使用自定义扩展的图标库字体，需配置此值为true
				},
				{
					iconPath: 'star',
					selectedIconPath: 'star-fill',
					text: '广场',
					customIcon: false,
				},
				{
					iconPath: 'https://cdn.uviewui.com/uview/common/min_button.png',
					selectedIconPath: 'https://cdn.uviewui.com/uview/common/min_button_select.png',
					text: '项目',
					customIcon: false,
				},
				{
					iconPath: 'account',
					selectedIconPath: 'account-fill',
					text: '我的',
					customIcon: false,
				}
			]

			ctx.commit("changeTabberList", menuList)
		},
		// 维保机构端/单位端 员工
		tabberCompany(ctx) {
			let menuList = [{
					iconPath: "home",
					selectedIconPath: "home-fill",
					text: '首页',
					count: 2,
					isDot: true,
					customIcon: false,
				},
				{
					name: '广场',
					name_code: 'guangchang',
					icon: '/static/footer_icon/c2.png',
					select_icon: '/static/footer_icon/c1.png',
					size: 'small'
				},
				{
					name: '任务',
					name_code: 'renwu',
					icon: '/static/footer_icon/f2.png',
					select_icon: '/static/footer_icon/f1.png',
					size: 'small'
				},
				{
					name: '我的',
					name_code: 'my',
					icon: '/static/footer_icon/d2.png',
					select_icon: '/static/footer_icon/d1.png',
					size: 'small'
				},
			]

			ctx.commit("changeTabberList", menuList)
		},
		menu_5(ctx) {
			let menuList = [{
					name: '首页',
					name_code: 'home',
					icon: '/static/footer_icon/a2.png',
					select_icon: '/static/footer_icon/a1.png',
					size: 'small'
				},
				{
					name: '广场',
					name_code: 'guangchang',
					icon: '/static/footer_icon/c2.png',
					select_icon: '/static/footer_icon/c1.png',
					size: 'small'
				},
				{
					name: '项目',
					name_code: 'xiangmu',
					icon: '/static/footer_icon/f2.png',
					select_icon: '/static/footer_icon/f1.png',
					size: 'small'
				},
				{
					name: '我的',
					name_code: 'my',
					icon: '/static/footer_icon/d2.png',
					select_icon: '/static/footer_icon/d1.png',
					size: 'small'
				},
			]

			ctx.commit("changeTabberList", menuList)
		},

		menu_5_task(ctx) {
			let menuList = [{
					name: '首页',
					name_code: 'home',
					icon: '/static/footer_icon/a2.png',
					select_icon: '/static/footer_icon/a1.png',
					size: 'small'
				},
				{
					name: '广场',
					name_code: 'guangchang',
					icon: '/static/footer_icon/c2.png',
					select_icon: '/static/footer_icon/c1.png',
					size: 'small'
				},
				{
					name: '任务',
					name_code: 'renwu',
					icon: '/static/footer_icon/f2.png',
					select_icon: '/static/footer_icon/f1.png',
					size: 'small'
				},
				{
					name: '我的',
					name_code: 'my',
					icon: '/static/footer_icon/d2.png',
					select_icon: '/static/footer_icon/d1.png',
					size: 'small'
				},
			]

			ctx.commit("changeTabberList", menuList)
		}

	}
}
